#include "front/text_normalize.h"

using namespace std;
using namespace ppspeech;

const wregex mcWregexDotLetter(L"([a-zA-Z]\\.)+");

void TextNormalizer::TnReDotLetter(wstring* fpInWsentence, const LanguageEnum fcInLanguage)
{
	wsmatch tWsmatch;

	while(regex_search(*fpInWsentence, tWsmatch, mcWregexDotLetter))
	{
		string tInSentence = wstring2utf8string(*fpInWsentence);
		string tStrReplace = wstring2utf8string(tWsmatch[0]);	//匹配到横杆的字符串
		StrReplace(tStrReplace, ".", " ");

		WstrReplacePosition(fpInWsentence, tWsmatch.position(0), tWsmatch.length(0), utf8string2wstring(tStrReplace));
	}
}
